
/*
 * File Name : agency.js
 * Description : This file has the javascript related to the agency page
 */

function toggle(value){
	//alert(value);	
	
	if(value == 'zip'){
		
		document.agency_page.zipcode.style.visibility='visible';
		
		document.agency_page.city.style.visibility='hidden';
		document.agency_page.city.value = 0;
		
		document.agency_page.neighbour.style.visibility='hidden';
		document.agency_page.neighbour.value = 0;
		
		document.agency_page.servcat.style.visibility='hidden';
		document.agency_page.servcat.value = 0;
	}
	else if(value == 'city'){
		document.agency_page.city.style.visibility='visible';
		
		document.agency_page.zipcode.style.visibility='hidden';
		document.agency_page.zipcode.value = null;
		
		document.agency_page.neighbour.style.visibility='hidden';
		document.agency_page.neighbour.value = 0;
		
		document.agency_page.servcat.style.visibility='hidden';
		document.agency_page.servcat.value = 0;
	}
	else if(value == 'neighbour'){
		document.agency_page.neighbour.style.visibility='visible';
		
		document.agency_page.zipcode.style.visibility='hidden';
		document.agency_page.zipcode.value = null;
		
		document.agency_page.city.style.visibility='hidden';
		document.agency_page.city.value = 0;
		
		document.agency_page.servcat.style.visibility='hidden';
		document.agency_page.servcat.value = 0;
	}
	else if(value == 'service'){
		document.agency_page.servcat.style.visibility='visible';
		
		document.agency_page.zipcode.style.visibility='hidden';
		document.agency_page.zipcode.value = null;
		
		document.agency_page.city.style.visibility='hidden';
		document.agency_page.city.value = 0;
		
		document.agency_page.neighbour.style.visibility='hidden';
		document.agency_page.neighbour.value = 0;
	}
}